package com.sj.mbt.request;

import android.text.TextUtils;

import com.sj.mbt.request.base.BaseRequestClient;
import com.sj.mbt.request.exception.BmobException;


/**
 * Created by huluhong on 2018/7/13.
 * <p>
 * 删除评论
 */

public class DeleteCommentRequest extends BaseRequestClient<String> {

    private String commentid;

    public void setCommentid(String commentid) {
        this.commentid = commentid;
    }


    @Override
    protected void executeInternal(final int requestType, boolean showDialog) {
        if (TextUtils.isEmpty(commentid)) {
            onResponseError(new BmobException("评论ID为空"), getRequestType());
            return;
        }
//        CommentInfo commentInfo = new CommentInfo();
//        commentInfo.setObjectId(commentid);
//        commentInfo.delete(new UpdateListener() {
//            @Override
//            public void done(BmobException e) {
//                if (e == null) {
//                    onResponseSuccess(commentid, requestType);
//                } else {
//                    onResponseError(e, requestType);
//                }
//            }
//        });
    }
}
